package com.task.core.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.task.common.domain.info.KeyAndValue;
import com.task.core.domain.AdvertiserInfo;
import com.task.core.dto.request.AdvertiserRequestDTO;

/**
 * @author 迪迦.
 * @date 2024/10/30 13:38
 */
@Mapper
public interface AdvertiserMapper {

  List<AdvertiserInfo> getAdvertiserByPage(AdvertiserRequestDTO request);

  List<KeyAndValue> getAdvertiserForOption(AdvertiserRequestDTO request);

  void addAdvertiser(AdvertiserRequestDTO request);

  Integer modifyAdvertiser(AdvertiserRequestDTO request);

  Integer deleteAdvertiser(@Param("code") String buyerCode, @Param("userId") Long userId);

  AdvertiserInfo getBuyerByCode(@Param("code") String code, @Param("name") String name);

  Integer getUsedCount(@Param("code") String code);

  AdvertiserInfo getAdvertiserDetail(AdvertiserRequestDTO advertiserRequestDTO);
}
